<template>
  <div>
    <h1>Child 子组件--- {{ list }}</h1>
    <div>
      <button type="button" @click="modifyList">修改List</button>
    </div>
  </div>
</template>

<script>
export default {
  inject: ["list"],
  methods: {
    modifyList() {
      this.list.push(5, 6, 7);
    },
  },
};
</script>
<style></style>
